package com.zebra.remoting.config;


import com.zebra.common.ZebraBaseMessage;
import io.netty.buffer.ByteBuf;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 网关向注册中心 询问 服务器信息 请求参数
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class AskTmsRequestMessage extends ZebraBaseMessage<AskTmsRequestMessage> {
//    private long userId; 消息头已经存在
//    private long token;
    // gameId  消息头已经存在
    private int cmd;
    private int processorType;

    @Override
    public void write(ByteBuf b) {
        writeInt(b, this.cmd);
        writeInt(b, this.processorType);
    }

    @Override
    public AskTmsRequestMessage read(ByteBuf b) {
        AskTmsRequestMessage askTmsRequest = new AskTmsRequestMessage();
        askTmsRequest.cmd = readInt(b);
        askTmsRequest.processorType = readInt(b);
        return askTmsRequest;
    }
}
